package com.castle.fortress.admin.study.exam.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.study.exam.entity.StudyMemberUnfinishExamEntity;
import com.castle.fortress.admin.study.exam.dto.StudyMemberUnfinishExamDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Map;
import java.util.List;

/**
 * 会员未完成试卷信息 服务类
 *
 * @author castle
 * @since 2023-02-16
 */
public interface StudyMemberUnfinishExamService extends IService<StudyMemberUnfinishExamEntity> {

    /**
     * 分页展示会员未完成试卷信息列表
     * @param page
     * @param studyMemberUnfinishExamDto
     * @return
     */
    IPage<StudyMemberUnfinishExamDto> pageStudyMemberUnfinishExam(Page<StudyMemberUnfinishExamDto> page, StudyMemberUnfinishExamDto studyMemberUnfinishExamDto);


    /**
     * 展示会员未完成试卷信息列表
     * @param studyMemberUnfinishExamDto
     * @return
     */
    List<StudyMemberUnfinishExamDto> listStudyMemberUnfinishExam(StudyMemberUnfinishExamDto studyMemberUnfinishExamDto);

    /**
     * 提交会员未完成的考试
     * @param examDTO
     * @return 是否还有考试机会 true 还能继续考试 false 不能继续考试
     */
    Boolean commitUnfinishExam(StudyMemberUnfinishExamDto examDTO);

    /**
     * 删除用户未完成的试卷
     * @param examId
     * @param memberId
     */
    void deleteExam(Long examId, Long memberId);
    /**
     * 更新选项答案
     * @param examDTO
     */
    void updateOneQuestion(StudyMemberUnfinishExamDto examDTO);
}
